/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Cristian
 */
@Entity
@Table(name = "pyfntbprogmeta")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Pyfntbprogmeta.findAll", query = "SELECT p FROM Pyfntbprogmeta p"),
    @NamedQuery(name = "Pyfntbprogmeta.findByPyfntbprogmetaid", query = "SELECT p FROM Pyfntbprogmeta p WHERE p.pyfntbprogmetaid = :pyfntbprogmetaid")})
public class Pyfntbprogmeta implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "pyfntbprogmetaid")
    private Integer pyfntbprogmetaid;
    @JoinColumn(name = "pyfntbpoaprogid", referencedColumnName = "pyfntbpoaprogid")
    @ManyToOne(optional = false)
    private Pyfntbpoaprog pyfntbpoaprogid;
    @JoinColumn(name = "pyfntbmetaestrid", referencedColumnName = "pyfntbmetaestrid")
    @ManyToOne(optional = false)
    private Pyfntbmetaestr pyfntbmetaestrid;

    public Pyfntbprogmeta() {
    }

    public Pyfntbprogmeta(Integer pyfntbprogmetaid) {
        this.pyfntbprogmetaid = pyfntbprogmetaid;
    }

    public Integer getPyfntbprogmetaid() {
        return pyfntbprogmetaid;
    }

    public void setPyfntbprogmetaid(Integer pyfntbprogmetaid) {
        this.pyfntbprogmetaid = pyfntbprogmetaid;
    }

    public Pyfntbpoaprog getPyfntbpoaprogid() {
        return pyfntbpoaprogid;
    }

    public void setPyfntbpoaprogid(Pyfntbpoaprog pyfntbpoaprogid) {
        this.pyfntbpoaprogid = pyfntbpoaprogid;
    }

    public Pyfntbmetaestr getPyfntbmetaestrid() {
        return pyfntbmetaestrid;
    }

    public void setPyfntbmetaestrid(Pyfntbmetaestr pyfntbmetaestrid) {
        this.pyfntbmetaestrid = pyfntbmetaestrid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (pyfntbprogmetaid != null ? pyfntbprogmetaid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Pyfntbprogmeta)) {
            return false;
        }
        Pyfntbprogmeta other = (Pyfntbprogmeta) object;
        if ((this.pyfntbprogmetaid == null && other.pyfntbprogmetaid != null) || (this.pyfntbprogmetaid != null && !this.pyfntbprogmetaid.equals(other.pyfntbprogmetaid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entities.Pyfntbprogmeta[ pyfntbprogmetaid=" + pyfntbprogmetaid + " ]";
    }
    
}
